import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);

export default new Router({
    routes: [
        {
            path: '/',
           redirect: '/chat'
        },
        {
            path: '/chat',
            name:'Chat',
            component: () => import('../views/Chat.vue'),
            meta: { title: '消息' }
        },
        {
            path: '/contacts',
            component: () => import('../views/Contacts.vue'),
            meta: { title: '通讯录' }
        },
        {
            path: '/profile',
            component: () => import('../views/UserProfile.vue'),
            meta: { title: '个人中心' }
        },
        {
            path: '/login',
            component: () => import('../views/Login.vue'),
            meta: { title: '登录' }
        },
        {
            path: '/register',
            component: () => import('../views/Register.vue'),
            meta: { title: '注册' }
        },
    ]
});
